/**    
 *    
 * 文件名：ApprovalHelper.java</br>
 * 版本信息：v1.0</br>
 * 日期：2017年10月13日</br>
 * © 2005-2017 雷技信息科技（上海）有限公司版权所有</br>
 *
 */
package com.logic.landseaserver.models.approval.taskhandle;

import com.logic.landseaserver.persistence.read.ApprovalRecordReadMapper;
import com.logic.landseaserver.persistence.read.ApprovalTempRecordReadMapper;
import com.logic.landseaserver.persistence.write.ApprovalLogRecordWriteMapper;
import com.logic.landseaserver.persistence.write.ApprovalRecordWriteMapper;
import com.logic.system.persistence.read.UserReadMapper;

/**
 *
 * 项目名称：system-server</br>
 * 类名称：ApprovalHelper</br>
 * 类描述：审核辅助类</br>
 * 创建人：Aaron</br>
 * 创建时间：2017年10月13日 下午4:02:13</br>
 * 
 * @version 1.0
 *
 */
public class ApprovalHelper
{
    private static ApprovalHelper instance;
    
    private UserReadMapper userReadMapper;
    
    private ApprovalRecordReadMapper approvalRecordReadMapper;
    
    private ApprovalRecordWriteMapper approvalRecordWriteMapper;
    
    private ApprovalTempRecordReadMapper approvalTempRecordReadMapper;
    
    private ApprovalLogRecordWriteMapper approvalLogRecordWriteMapper;
    
    private ApprovalHelper()
    {
        
    }
    
    public static ApprovalHelper getInstance()
    {
        if (null == instance)
        {
            instance = new ApprovalHelper();
        }
        
        return instance;
    }
    
    public void init(ApprovalRecordReadMapper approvalRecordReadMapper,
        ApprovalTempRecordReadMapper approvalTempRecordReadMapper, UserReadMapper userReadMapper,
        ApprovalLogRecordWriteMapper approvalLogRecordWriteMapper, ApprovalRecordWriteMapper approvalRecordWriteMapper)
    {
        this.approvalRecordReadMapper = approvalRecordReadMapper;
        this.approvalTempRecordReadMapper = approvalTempRecordReadMapper;
        this.userReadMapper = userReadMapper;
        this.approvalLogRecordWriteMapper = approvalLogRecordWriteMapper;
        this.approvalRecordWriteMapper = approvalRecordWriteMapper;
        
    }
    
    public ApprovalRecordReadMapper getApprovalRecordReadMapper()
    {
        return approvalRecordReadMapper;
    }
    
    public ApprovalTempRecordReadMapper getApprovalTempRecordReadMapper()
    {
        return approvalTempRecordReadMapper;
    }
    
    public UserReadMapper getUserReadMapper()
    {
        return userReadMapper;
    }
    
    public ApprovalLogRecordWriteMapper getApprovalLogRecordWriteMapper()
    {
        return approvalLogRecordWriteMapper;
    }
    
    public ApprovalRecordWriteMapper getApprovalRecordWriteMapper()
    {
        return approvalRecordWriteMapper;
    }
}
